package com.chixing.day_07_prototype.product;

public class Product implements Cloneable{
    private Integer proId;
    private String proName;
    private Float proPrice;

    public Product(Integer proId, String proName, Float proPrice) {
        this.proId = proId;
        this.proName = proName;
        this.proPrice = proPrice;
    }

    public Product() {
    }

    @Override
    //浅克隆
    protected Product clone() throws CloneNotSupportedException {
        Product product = new Product();
        product.proId = this.proId;
        product.proName = this.proName;
        product.proPrice = this.proPrice;
        return product;
    }



    public Integer getProId() {
        return proId;
    }

    public void setProId(Integer proId) {
        this.proId = proId;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public Float getProPrice() {
        return proPrice;
    }

    public void setProPrice(Float proPrice) {
        this.proPrice = proPrice;
    }

    @Override
    public String toString() {
        return "Product{" +
                "proId=" + proId +
                ", proName='" + proName + '\'' +
                ", proPrice=" + proPrice +
                '}';
    }
}
